﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace ProgressBarTest
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();

            XprogressBar.Value = 99;
            XprogressBar2.BarValue = 99;

            XcycelBar1.Text = "CYCLE1";
            XcycelBar1.Value = 50;
            XcycelBar2.Text = "CYCLE2";
            XcycelBar2.Value = 99;
            XcycelBar3.Text = "CYCLE3";
            XcycelBar3.Value = 50;
        }

        private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
        {
            Random r = new Random();
            int m = r.Next(0, 100);

            XprogressBar.Value = m;
            XprogressBar2.BarValue = m;
            XcycelBar2.Value = m;

            m = r.Next(0, 100);
            XcycelBar1.Value = m;

            m = r.Next(0, 100);
            XcycelBar3.Value = m;
        }
    }
}
